package Thread;

//测试join方法
public class demo5 implements Runnable {
	
		@Override
		public void run() {
			for (int i = 0; i <50; i++) {
				System.out.println("bbb");
			}
		}
		
		
		public static void main(String[] args) throws InterruptedException {
			//创建runnable接口的实现类对象
			demo5 bb=new demo5();
			//创建线程对象，通过线程对象来开启我们的线程，代理
			Thread thread=new Thread(bb);
			thread.start();
			
			for (int i = 0; i <200; i++) {
				if (i==100) {
					thread.join();
				}
				System.out.println("aaa");
			}
			
		}
}
